/*!
    \copyright  Copyright (c) 2019 - 2025 Qualcomm Technologies International, Ltd.
                All Rights Reserved.
                Qualcomm Technologies International, Ltd. Confidential and Proprietary.
    \file       
    \addtogroup pairing
    \brief      Pairing plugin internal interface
    @{
*/

#ifndef PAIRING_PLUGIN_H_
#define PAIRING_PLUGIN_H_

#include "pairing.h"
#include <cm_lib.h>

/*! 
    \brief Initialise pairing_plugin 
 */
void Pairing_PluginInit(void);

/*!
    \brief Call pairing plugin to handle remote IO capability if registered

    \param[in] pairing_plugin pairing plugin callback info
    \param[in] ind The remote IO capability indication message

    \returns TRUE if pairing plugin handled the message, otherwise FALSE
 */
bool Pairing_PluginHandleRemoteIoCapability(pairing_plugin_t* pairing_plugin, const CsrBtCmSmIoCapabilityResponseInd *ind);

/*! \brief Call pairing plugin to handle Cross transport Key Ind if registered

    \param[in] pairing_plugin pairing plugin callback info
    \param[in] ind The Cross transport Key Request
    \param[out] plugin_response Pointer which will be populated with the plugin's response

    \returns TRUE if pairing plugin handled the message and populated the response,
             otherwise FALSE
 */
bool Pairing_PluginHandleCrossTransKeyInd(pairing_plugin_t* pairing_plugin, const CmSmGenerateCrossTransKeyRequestInd *ind, pairing_plugin_rsp_t *plugin_response, pairing_ctkd_rsp_t* ctkd_response);

/*! \brief Call pairing plugin to handle IO capability request if registered

    \param[in] pairing_plugin pairing plugin callback info
    \param[in] ind The IO capability request indication message
    \param[out] response Pointer which will be populated with the plugin's response
    \param[out] io_capability_rsp Pointer which will be populated with the plugin's capability response

    \returns TRUE if pairing plugin handled the message and populated the response and capability response
             otherwise FALSE
 */
bool Pairing_PluginHandleIoCapabilityRequest(pairing_plugin_t* pairing_plugin,const CsrBtCmSmIoCapabilityRequestInd *ind, pairing_plugin_rsp_t* response, pairing_io_capability_rsp_t* io_capability_rsp);

/*! \brief Call pairing plugin to handle user confirmation request if registered

    \param[in] pairing_plugin pairing plugin callback info
    \param[in] ind The user confirmation request indication message
    \param[out] response Pointer which will be populated with the plugin's response
    \param[out] user_confirmation_rsp Pointer which will be populated with the plugin's capability response

    \returns TRUE if pairing plugin handled the message and populated the response,
             otherwise FALSE
 */
bool Pairing_PluginHandleUserConfirmationRequest(pairing_plugin_t* plugin, const CsrBtCmSmUserConfirmationRequestInd *ind, pairing_plugin_rsp_t* response, pairing_user_confirmation_rsp_t* user_confirmation_rsp);

/*! \brief Call pairing plugin to handle bond indication request if registered

    \param[in] pairing_plugin pairing plugin callback info
    \param[in] ind The bond indication message
    \param[out] ble_permission Pointer

    \returns TRUE if pairing plugin handled the message and populated the response,
             otherwise FALSE
 */
bool Pairing_PluginHandleSppCompleteIndication(pairing_plugin_t* pairing_plugin, const CsrBtCmSmSimplePairingCompleteInd* ind, pairing_plugin_rsp_t* response, pairing_ssp_complete_rsp_t* bredr_bond_rsp);

/*! 
    \brief Notify plugin that pairing has completed

    \param[in] pairing_plugin pairing plugin callback info
 */
void Pairing_PluginPairingComplete(pairing_plugin_t* pairing_plugin);

#endif

/*! @} */
